import request from '@/utils/request'

export function getsettings(params) {
  return request({
    method: 'get',
    url: '/sys/role',
    params
  })
}

export function delRolesById(id) {
  return request({
    method: 'delete',
    url: '/sys/role/' + id
  })
}

export function addRole(data) {
  return request({
    url: '/sys/role',
    method: 'post',
    data
  })
}

export function updataRole(data) {
  return request({
    url: '/sys/role/' + data.id,
    method: 'put',
    data
  })
}

export function getAssignDetail(id) {
  return request({
    url: '/sys/role/' + id,
    method: 'get'

  })
}

export function assignPermission(data) {
  return request({
    url: '/sys/role/assignPrem',
    method: 'put',
    data
  })
}

